import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Home from '@/components/home/Home'
import Login from '@/components/home/Login'
import Register from '@/components/home/Register'
import Discuss from '@/components/discuss/Discuss'
import DiscussList from '@/components/discuss/DiscussList'
import ChatHome from '../components/chat-home/ChatHome.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      component: Home,
      children: [
        {
          path: '/home',
          redirect: '/home/login'
        },
        {
          path: '/home/login',
          component: Login
        },
        {
          path: '/home/register',
          component: Register
        }
      ]

    },
    {
      path: '/discuss/discussList',
      component: DiscussList
    },
    {
      path: '/discuss/discussDetail',
      component: Discuss
    },
    {
      path: '/chat',
      component: ChatHome
    },
    {
      path: '**',
      redirect: '/home'
    }
  ]
})
